import React from 'react'
import { useSelector } from 'react-redux'
import Item from '../Item/Item'
import './List.css'
export default function List(props) {
  const list = useSelector((state) => {
    return state.zs.list
  })
  return (
    <ul className="todo-main">
      {list.map((item) => (
        <Item key={item.id} todo={item}></Item>
      ))}
    </ul>
  )
}
